#! /bin/bash

function input {
    cat tests/input1.0;
    
    COUNTER=0

    while [ $COUNTER -lt $1 ]; do
        sleep 1;
        let COUNTER+=1;
    done;
}

mkdir tests

echo -e "GET / HTTP/1.0\nHost:$1\n" > tests/input1.0

curl $1 -i > tests/outOriginal1.0

input $3 | netcat -i 1 localhost $2 > tests/outOur1.0

diff tests/outOriginal1.0 tests/outOur1.0
